package listener;

import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;


//ServletContextListener
//        ServletContextAttributeListener
//        ServletRequestListener
//        ServletRequestAttributeListener
//        HttpSessionListener
//        HttpSessionAttributeListener
@WebListener
public class ListenerTest1 implements HttpSessionListener {
    @Override
    public void sessionCreated(HttpSessionEvent httpSessionEvent) {
        System.out.println("创建session");
    }

    @Override
    public void sessionDestroyed(HttpSessionEvent httpSessionEvent) {
        System.out.println("销毁session");
    }
}
